package com.edu.exam.enums.examination.paper;

/**
 * 考号人工验证结果枚举
 *
 * @author System
 * @version 1.0.0
 */
public enum ExamNumberManualVerificationResult {
    CORRECT("CORRECT", "正确"),
    INCORRECT("INCORRECT", "错误"),
    AMBIGUOUS("AMBIGUOUS", "模糊"),
    UNCLEAR("UNCLEAR", "不清晰"),
    PARTIAL("PARTIAL", "部分可见"),
    CONFIRMED("CONFIRMED", "已确认"),
    REJECTED("REJECTED", "已拒绝"),
    SKIPPED("SKIPPED", "已跳过"),
    PENDING("PENDING", "待验证"),
    NEEDS_REVIEW("NEEDS_REVIEW", "需复核");

    private final String code;
    private final String description;

    ExamNumberManualVerificationResult(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static ExamNumberManualVerificationResult fromCode(String code) {
        for (ExamNumberManualVerificationResult result : ExamNumberManualVerificationResult.values()) {
            if (result.code.equals(code)) {
                return result;
            }
        }
        throw new IllegalArgumentException("Unknown exam number manual verification result code: " + code);
    }

    @Override
    public String toString() {
        return description;
    }
}
